Repository navigation
Runs finish without a person: stacked bases, registries, stalled tasks, waits and CI rounds - #796
Merged
Merged
Conversation
Two tickets asked for the same change, and two runs built it from the default branch with one commit per file written. Several of their commits had the same patch id, so the first ticket's kept branch read as copying the sibling's open pull request. Its retries continued the same kept branch and stopped before the pull request step on old code. Today the change is rebuilt on the other branch and the run stacks on it, but two gaps were left: - A pull request the run reuses (its own open one, or a reopened one) never moved off its old base. Its diff showed the other pull request's whole change beside this one, while its description said it was stacked and showed only this change. It now moves onto the run's base when that base is another open pull request's branch of the repository; any other base is left alone. - On the next attempt, whose base starts again from the default branch, the other pull request's own commits on the branch (the same hashes) read as copies and the change was rebuilt and force pushed again. A branch whose shared commits are all the other pull request's own is built on it: the run takes that branch as its base and rebuilds nothing. Incident case fa_stacked_pr_targets_its_base.
…ld by what the file is Two new-feature runs were blocked "new items aren't registered everywhere their siblings are" for places that register nothing: a one-off data migration that lists the document types it rewrote, and a package.json that names UI libraries as dependencies. The rule called a file a registry when it named most of a sample of eight siblings (the first eight by name), and told places apart by folder names (migrations/, docs/, fixtures/). So a backfill kept in any other folder, or a generated types file, still counted, and a real index of migrations never did. A registry is now told by what the file is: - it lists the kind: more than half of all the existing siblings (never a sample), by path or as whole strings; a kebab-case name such as `boat-index` no longer counts as naming `boat`; - it is part of the program: not prose, a test or its fixtures, a file the repository's own generators write (read from their config), or a file whose head says it is generated (it is regenerated, never edited); - it grew with the kind: its history on the default branch shows it naming fewer of the siblings when it was written than now. A file that lists them but never grew is noted for a person with why; one whose history can't be read isn't checked. Neither blocks. Only a checked registry blocks, and the coder is first told to add the entry itself. Incident case rg replays both runs' shapes; three of its checks fail on the code before this change.
… it back
The guard's count of continuations without a finished task fired one step
after the supervisor's ladder deferred the first stuck task, with words that
hand the work to a person ("it continued 7 times without finishing another
task ... Push to the branch"). The draft it opened shipped the work, but the
stop stayed on the run, so the pull request's CI fix round and ready decision
hit the stop on their first pass and the run ended failed instead of fixed.
That stop is now a shipping stop like the converged one: its reason says
what shipped and that the open tasks are deferred with why, and it is taken
back once the work is on its pull request. Spend, pass transitions and the
run ceilings stay hard stops. Incident dq replays the stuck run's steps
through the step marks, the ladder and the guard.
…ing again never starts a second run; a fresh run ends its ticket's earlier waits The stuck-run sweep measured a wait from the run's last update, which its own reminder moved, so every wait was reminded daily; and its scan never read the default and deadline fields, so no stated default was ever taken. An alarm's gate compared two different texts, so each firing started a run beside the one still waiting. A run waiting on a person was not live, so a new trigger took the ticket over and left the old wait behind.
…e per check The stacked-base helpers landed between reopen_prior_pr and its doc comment, so the comment described the wrong function. The new-feature check read the same candidate's commit history again for each new item it checked; it is now read once per check.
…unds keep their work - A ci_failed event written without a webhook (a missed webhook, a straggler, a redrive) reads the failing checks from GitHub and carries each workflow's name, run id, conclusion and failing jobs, so the fix round reads the job log, can re-run it and compares it against the base. No failure is described as "Workflow 'unknown' failed (run_id: 0)". - A failure whose log shows a limit of the cloud account (TooMany..., ...LimitExceeded, ...QuotaExceeded, "reached the maximum number of") is not the change's: no fix round or re-run, nothing taken out; the pull request says so and names the repository's cleanup workflow. - Every contents URL percent-encodes each path segment and the ref, so a path like `%5Fmarkdown/[[...slug]]` reads the file it names. - A file GitHub won't give back is not a missing WIP branch: the branch and its work are kept, and the CI fix loop deletes the branch only for a fault that calls for a clean start. - A new CI or review fix round on a head where an unfinished round left checkpoints goes on from that WIP branch instead of resetting it. Incidents: fd_red_ci_not_the_changes, fe_round_work_round_trips.
A browser's QuotaExceededError or a client's TooManyRedirects thrown by the code under test is the change's failure. Reading those words anywhere in a log as the account's limit would have marked a pull request ready with its bug in it. Only the code in an AWS CLI 'An error occurred (Code)' line, or an SDK's ...Exception, counts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Failed, stuck and repeated runs were traced to the code paths that stopped them, using the run records, events, per-pass conversations and worker logs. Most were already fixed on main by an earlier change, which is named with its test below. This PR fixes the causes that main still has. Each fix comes with a test that fails on main and passes here.
Already fixed on main, no change here:
r_github_limit).u_stacked_plan_check).da_finished_run_ships).g_large_plan), and a cut plan revision (Release: plans survive a cut revision; old security pull request descriptions rebuilt fresh #720,bs_cut_plan_revision)...output paths (Runs keep going while they make progress; a step's time never fails a run #357, Every file a generator changes is committed, generated tasks it settled are done, and a finished run always opens a PR #358,e_large_generated_output).restore_filefrom another branch (Worker: stack on an open series part or the PR that adds a named file #416).pr_body_fit).Changes
Stacked pull requests (
fa_stacked_pr_targets_its_base). Two tickets built the same change, so commits with the same patch id read as copies of the sibling's open pull request, and every retry stopped on them. Main now rebuilds the change on the sibling's branch, but two gaps were left:New-feature rules (
rg_registered_where_the_kind_grows). A "registry" was judged from a sample of 8 siblings and a list of folder names. That let a one-off backfill outsidemigrations/, or a generated types file, block a pull request. A real registry kept undermigrations/was never checked. A registry is now told by what the file is:A file that lists the kind but never grew is only noted, and so is one whose history can't be read. Neither blocks.
Stalled tasks (
dq_unfinished_stop_ships). When continuations stopped finishing planned tasks after the supervisor had changed approach, the guard "handed it to you". The stop then stayed on the run, so the next red CI ended the run without a fix. That stop now ships what is done, defers the open tasks on the pull request with the reason, and is taken back once the work is on the pull request. Spend, pass transitions and the run ceilings stay hard stops.Waiting on a person (
dj_new_run_ends_earlier_waits, stuck-run sweep tests).ask_default,ask_deadlineorask_default_taken_at, so no stated default was ever taken. It reads them now.retriedand point to it.CI fix rounds (
fd_red_ci_not_the_changes,fe_round_work_round_trips).QuotaExceededErroror a client'sTooManyRedirectsfrom the code under test is still the change's failure.coderhelm-wip/<branch>to the pull request head, which threw away up to 20 checkpoint commits. A round now continues from that branch when it sits exactly on the head.Verification
Each new incident case or test was run against origin/main and fails there:
fa: does not compile on main; the functions it needs do not exist.rg: 3 of 3 fail on main's rule.dq: fails with "a CoderHelm limit ships what is done".djand the gateway alert test: the gateway test fails with "needs_input started a second run";djdoes not compile on main.fdandfe: 9 of 9 fail on main's behaviour.Gates, run locally on this branch as CI runs them:
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --no-fail-fastpython3 -m unittest discover -s lambda/testsStill open, not in this PR: